package com.wyc.exception;

import com.wyc.pojo.Result;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class GlobalExceptionHandler {

    @ExceptionHandler(Exception.class)
    public Result exc(Exception exception){
        exception.printStackTrace();
        return Result.error("错误异常2");
    }

}
